class draw {
    constructor(option) {
        this.map = new mapboxgl.Map(option);
        this.map.on('drag', () => {
           
            if(menuStatus ){
             
                menuStatus=false;
                let omain = document.getElementById('main')
                omain.style.left = -1000 + 'px';
                omain.style.top = -1000 + 'px';
            }
        })
        this.map.on('zoom', () => {
            if(menuStatus ){
                menuStatus=false;
                let omain = document.getElementById('main')
                omain.style.left = -1000 + 'px';
                omain.style.top = -1000 + 'px';
            }
        })
        this.map.on('load', () => {
           
            let map = this.map;
            map.addControl(new mapboxgl.NavigationControl({ visualizePitch: true, showZoom: false }), 'top-right');
            map.addSource('wms-test-source', {
                'type': 'raster',
                'tiles': [
                    'https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}.png'
                ],
                'tileSize': 256
            });
            map.addLayer(
                {
                    'id': 'wms-test-layer',
                    'type': 'raster',
                    'source': 'wms-test-source',
                    'paint': {}
                },

            );
            map.addSource('offline', {
                'type': 'raster',
                'tiles': [
                    './google/{z}/{x}/{y}.png'
                ],
                'tileSize': 256
            });
            map.addLayer(
                {
                    'id': 'offline',
                    'type': 'raster',
                    'source': 'offline',
                    'paint': {}
                },
            );
            map.addSource('flymap', {
                'type': 'image',
                url: "",
                coordinates: [[-76.54, 39.18],
                [-76.52, 39.18],
                [-76.52, 39.17],
                [-76.54, 39.17]],
            });
            map.addLayer({
                id: 'radarLayer',
                'type': 'raster',
                'source': 'flymap',
                'paint': {
                },
                'layout': {
                    'visibility': 'none',
                   
                },
            });
            map.addSource('outCircleSource', {
                type: 'geojson',
                data: {
                    type: 'FeatureCollection',
                    features: [

                    ]
                }
            })
            map.addLayer({
                id: "outCircle",
                type: "fill", //通过此配置项为圆添加填充色
                source: 'outCircleSource',
                paint: {
                    'fill-color': [
                        "get", "color",
                    ],
                    "fill-opacity": 0.5
                },
            });
            map.addSource('innerCircleSource', {
                type: "geojson",
                data: {
                    type: 'FeatureCollection',
                    features: [

                    ]
                }
            })
            map.addLayer({ //内层圈
                id: "innerCircle",
                type: "circle",
                source: 'innerCircleSource',
                paint: {
                    'circle-radius': 8,
                    'circle-color': 'white'
                },
            });

            map.addSource('route', {
                'type': 'geojson',
                'data': {
                    'type': 'FeatureCollection',
                    'features': [

                    ],

                }
            });
            map.addLayer({
                'id': 'route1',
                'type': 'line',
                'source': 'route',
                'layout': {
                    'line-join': 'round',
                    'line-cap': 'round'
                },
                'paint': {
                    'line-color': [
                        "get", "color",
                    ],
                    'line-width': 3
                }
            });
            map.addSource('trackRoute', {
                'type': 'geojson',
                'data': {
                    'type': 'FeatureCollection',
                    'features': [

                    ],

                }
            });
            map.addLayer({
                'id': 'trackRoute',
                'type': 'line',
                'source': 'trackRoute',
                'layout': {
                    'line-join': 'round',
                    'line-cap': 'round'
                },
                'paint': {
                    'line-color': [
                        "get", "color",
                    ],
                    'line-width': 3
                }
            });
        });
        //所有的绘制图形缓存管理 管理marker就行 其他的都是一个单独的source 
        this.overlays = {
            markers: new Map()  //map的键重复会覆盖 且查询速度快 
        }
    };
    //绘制marker 保存分为两类 如果pos有值则绘制的为route(路线)类 分为开始图标和结束图标
    addMarker(infor) {
        //marker的setLngLat设置位置 改变innerHTMl更新内容 marker通过remove方法删除它
        //data:[{coordinates:[112.903902,28.240418],id,icon:""}]   //getElement获取元素
        //callback是用来敌我标识用的
        let { meshId, coordinates, icon, iconSize, pos, callBack, remark } = infor
        let el = document.createElement('div');
        el.className = 'memberBox';
        if (callBack) {
            el.addEventListener("click", callBack)
        }
        if (remark) {
            var innerHTML =
                `<div>
            <img src=${icon} style='width:${iconSize[0]}px;height:${iconSize[1]}px'>
            </div>
            <div class='hostileLabel'>${remark}</div>`
        } else {
            var innerHTML = `
            <div>
                <img src=${icon} style='width:${iconSize[0]}px;height:${iconSize[1]}px'>
                
            </div>
           
            `
        }
        el.innerHTML = innerHTML
        let marker = new mapboxgl.Marker(el);
        marker.setLngLat(coordinates);
        marker.addTo(this.map);
        if (!pos) {

            this.overlays.markers.set(meshId, marker)
        } else {
            this.overlays.markers.set(meshId + pos, marker)
        }
        return marker
    };
    //绘制成员信息
    addMemeberMarker(infor, other = { name: "你好", id: '12345678', groupName: "" }, statusList) {
        let { meshId, coordinates, icon, callBack, } = infor
        let el = document.createElement('div');
        el.className = 'memberBox';
        var innerHTML = `<div><img src=${icon}></div>`
        let label = this.getMemeberMarkerHTML(other, statusList)
        innerHTML += label.labelText;

        el.innerHTML = innerHTML;
        if (callBack) {
            el.onclick = () => {
                callBack(label.details)
            }
        }
        let marker = new mapboxgl.Marker(el);
        marker.setLngLat(coordinates);
        marker.addTo(this.map);
        this.overlays.markers.set(meshId, marker)
    };
    //更新成员信息
    updateMemeberMarker(id, other, statusList, callBack, coordinates) {
        let marker = this.overlays.markers.get(id);
        marker.setLngLat(coordinates);
        let icon = './js/images/my/38.png';
        let el = marker.getElement();
        var innerHTML = `<div><img  src=${icon}></div>`
        // console.log(statusList,213);
        let label = this.getMemeberMarkerHTML(other, statusList)
        innerHTML += label.labelText;

        el.innerHTML = innerHTML;
        if (callBack) {
            el.onclick = () => {
                callBack(label.details)
            }
        }
    }
    //移除marker
    removeMarker(id) {
        let marker = this.overlays.markers.get(id);
        if (marker) {
            marker.remove()
        }
    };
    updateMarker(updateInfo) {
        let { meshId, coordinates } = updateInfo;
        let marker = this.overlays.markers.get(meshId);

        marker.setLngLat(coordinates)
    };
    //添加路线  不属于动态绘制 任务类绘制
    addRoute(routeInfo, isTemp) {

        //上方需要id定义图层 color定义线条颜色 需要经纬度坐标信息 多节点任务开始位置和结束位置暂未增加标记图标
        let map = this.map;
        var { id, color, coordinates, name } = routeInfo;
        let properties = {
            'color': color
        }

        var source = map.getSource('route');
        if (!source) {
            map.addSource('route', {
                'type': 'geojson',
                'data': {
                    'type': 'FeatureCollection',
                    'features': [
                        {
                            id,  //用来更新具体某个线条来判断
                            type: 'feature',
                            properties,
                            'geometry': {
                                'type': 'LineString', //表示绘制的是线条
                                coordinates,
                            }
                        }
                    ],

                }
            });
            map.addLayer({
                'id': 'route1',
                'type': 'line',
                'source': 'route',
                'layout': {
                    'line-join': 'round',
                    'line-cap': 'round'
                },
                'paint': {
                    'line-color': [
                        "get", "color",
                    ],
                    'line-width': 3
                }
            });
        } else {
            let features = source._data.features;//路线数据管理
            let feature = {
                id,
                'type': 'Feature',
                properties,
                'geometry': {
                    'type': 'LineString',
                    coordinates,
                }

            }
            features.push(feature)
            source.setData({
                type: 'FeatureCollection',
                features,
            });
        }
        //绘制起始点位置
        if (!isTemp) {
            let start = coordinates[0];
            let startInfo = {
                meshId: id,
                coordinates: start,
                icon: ("./js/images/my/65.png"),
                iconSize: [15, 15],
                remark: name,
                pos: 'start'
            }
            this.addMarker(startInfo);
            if (coordinates.length > 1) {
                let end = coordinates.slice(-1)[0];
                let endInfo = {
                    meshId: id,
                    coordinates: end,
                    icon: ("./js/images/my/66.png"),
                    iconSize: [24, 24],
                    pos: 'end'
                }
                this.addMarker(endInfo)
            }
        }
    };
    //添加轨迹路线
    addTrackRoute(routeInfo) {
        //上方需要id定义图层 color定义线条颜色 需要经纬度坐标信息 多节点任务开始位置和结束位置暂未增加标记图标
        let map = this.map;
        var { id, color, coordinates } = routeInfo;
        let properties = {
            'color': color
        }
        var source = map.getSource('route');
        if (!source) {
            map.addSource('route', {
                'type': 'geojson',
                'data': {
                    'type': 'FeatureCollection',
                    'features': [
                        {
                            id,  //用来更新具体某个线条来判断
                            type: 'feature',
                            properties,
                            'geometry': {
                                'type': 'LineString', //表示绘制的是线条
                                coordinates,
                            }
                        }
                    ],

                }
            });
            map.addLayer({
                'id': 'trackRoute',
                'type': 'line',
                'source': 'route',
                'layout': {
                    'line-join': 'round',
                    'line-cap': 'round'
                },
                'paint': {
                    'line-color': [
                        "get", "color",
                    ],
                    'line-width': 3
                }
            });
        } else {
            let features = source._data.features;//路线数据管理
            let item = features.find(feature => {
                return feature.id == id
            })
            if (item) {

                item.geometry.coordinates = coordinates
            } else {
                let feature = {
                    id,
                    'type': 'Feature',
                    properties,
                    'geometry': {
                        'type': 'LineString',
                        coordinates,
                    }

                }
                features.push(feature)
            }
            source.setData({
                type: 'FeatureCollection',
                features,
            });
        }
    };
    //移除路线
    removeRoute(id, sourceName) {
        let map = this.map;
        var source = map.getSource('route');
        // if (sourceName) {
        //     source = map.getSource(sourceName)
        // }
        if (source) {
            let features = source._data.features;//路线数据管理
            if (features) {
                features = features.filter(feature => {
                    return feature.id != id
                })
                source.setData({
                    type: 'FeatureCollection',
                    features,
                });
            }
        }
        //后续
        // this.removeMarker()
    };
    //点击绘制路线 
    updateRoute(info) {
        var { id, coordinates, color } = info;
        let map = this.map;
        let source = map.getSource('route');
        if (source) {
            let features = source._data.features;
            let index = features.findIndex(feature => {
                return feature.id == id
            })

            if (index > -1) {//绘制路线已存在
                let feature = features[index];
                feature.properties.color = color;
                feature.geometry.coordinates.push(coordinates[0]);
            } else {
                let feature = {
                    id,
                    type: 'Feature',
                    "properties": { color },
                    'geometry': {
                        'type': 'LineString',
                        coordinates,
                    }
                }
                features.push(feature)
            }
            source.setData({
                "type": "FeatureCollection",
                features
            })
        } else {
            this.addRoute(info, true)
        }

    };
    //通过id获取路线的点
    getRoutePointsById(id) {
        let map = this.map;
        var source = map.getSource('route');
        let features = source._data.features;//路线数据管理
        let feature = {}
        feature = features.find(feature => {
            return feature.id == id
        })

        if (feature) {
            let coordinates = feature.geometry.coordinates;
            let points = coordinates.map(it => {
                return { longitude: (it[0] * 1).toFixed(6), latitude: (it[1] * 1).toFixed(6) }
            })
            return points
        }

    };
    //增加圆为双圆
    addCircleTask(info) {
        let map = this.map;
        var { id, centerCoordinate, radians, color, callBack } = info //创建圆的基础信息

        let outCircleSource = map.getSource('outCircleSource'); //获取source
        if (!outCircleSource) {  //首次需要创建layer
            let circlePoints = this.createGeoJSONCircle(radians, centerCoordinate);
            map.addSource('outCircleSource', {
                type: 'geojson',
                data: {
                    type: 'FeatureCollection',
                    features: [
                        {
                            id, //通过id管理圆形
                            "type": "Feature",
                            "properties": { 'color': color },
                            'geometry': {
                                'type': 'Polygon',
                                coordinates: circlePoints
                            }
                        }
                    ]
                }
            })
            map.addLayer({
                id: "outCircle",
                type: "fill", //通过此配置项为圆添加填充色
                source: 'outCircleSource',
                paint: {
                    'fill-color': 'red',

                },
            });
            map.addSource('innerCircleSource', {
                type: "geojson",
                data: {
                    type: 'FeatureCollection',
                    features: [
                        {
                            id,
                            'type': 'Feature',
                            'geometry': {
                                'type': 'Point',
                                coordinates: centerCoordinate
                            }
                        },
                    ]
                }
            })
            map.addLayer({ //内层圈
                id: "innerCircle",
                type: "circle",
                source: 'innerCircleSource',
                paint: {
                    'circle-radius': 8,
                    'circle-color': 'white'
                },
            });


        } else {
            let outfeatures = outCircleSource._data.features;//原有的绘制圆信息
            let outfeature = this.createGeoJSONCircleFeature(radians, centerCoordinate); //创建要绘制的圆
            outfeature.properties = {
                color
            }
            outfeature.id = id; //添加id
            outfeatures.push(outfeature); //修改外圈数据
            outCircleSource.setData({
                type: 'FeatureCollection',
                features: outfeatures
            });
            let innerSource = map.getSource('innerCircleSource'); //内圈source
            let innerFeatures = innerSource._data.features; //内圈Features
            let innefeature = this.creatInnerCircleFeature(centerCoordinate); //创建要绘制的圆
            innefeature.id = id; //添加id 
            innefeature.properties = {}
            innerFeatures.push(innefeature);
            innerSource.setData({
                type: 'FeatureCollection',
                features: innerFeatures
            });

        }
        if (callBack) {
            this.map.on('click', 'innerCircle', callBack)
        }
    };
    //删除圆任务
    removeCircle(id) {
        //通过更新data更新视图
        let map = this.map;
        let outCircleSource = map.getSource('outCircleSource'); //获取source
        if (outCircleSource) {
            let outfeatures = outCircleSource._data.features;//原有的绘制圆信息
            outfeatures = outfeatures.filter(feature => {
                return feature.id != id
            })
            outCircleSource.setData({
                type: 'FeatureCollection',
                features: outfeatures
            });

        }
        let innerCircleSource = map.getSource('innerCircleSource'); //内圈source
        if (innerCircleSource) {
            let innerFeatures = innerCircleSource._data.features; //内圈Features
            innerFeatures = innerFeatures.filter(feature => {
                return feature.id != id
            })
            innerCircleSource.setData({
                type: 'FeatureCollection',
                features: innerFeatures
            });
        }
    };
    //添加白色小圈 临时绘制
    addWhiteCircle(info) {
        let { coordinates, id } = info;

        let map = this.map;
        let source = map.getSource('innerCircleSource')
        if (!source) {

            map.addSource('innerCircleSource', {
                type: "geojson",
                data: {
                    type: 'FeatureCollection',
                    features: [
                        {
                            id,
                            'type': 'Feature',
                            'geometry': {
                                'type': 'Point',
                                coordinates,
                            }
                        },
                    ]
                }
            })
            map.addLayer({
                id: 'innerCircle',
                type: "circle",
                source: 'innerCircleSource',
                paint: {
                    'circle-radius': 8,
                    'circle-color': 'white'
                },
            });
        } else {
            let innerSource = map.getSource('innerCircleSource'); //内圈source
            let innerFeatures = innerSource._data.features; //内圈Features
            let innefeature = this.creatInnerCircleFeature(coordinates); //创建要绘制的圆
            innefeature.id = id; //添加id 
            innerFeatures.push(innefeature);
            innerSource.setData({
                type: 'FeatureCollection',
                features: innerFeatures
            });
        }
        // map.on('click', id, (e) => {
        //     var features = map.queryRenderedFeatures(e.point, {
        //         layers: [id],
        //     });
        //     console.log(e,features,370);
        // })
    };
    //添加大圈 临时绘制
    addBigCircle(info) {
        var { centerCoordinate, radians, color, id } = info
        var map = this.map;
        let source = map.getSource('outCircleSource');
        if (!source) {
            let circlePoints = this.createGeoJSONCircle(radians, centerCoordinate);

            id = id + ''
            map.addSource('outCircleSource', {
                'type': 'geojson',
                'data': {
                    'type': 'FeatureCollection',
                    'features': [
                        {

                            id,
                            "type": "feature",
                            properties: {
                                'color': color
                            },
                            'geometry': {
                                'type': 'Polygon',
                                'coordinates': circlePoints
                            }
                        }
                    ]
                }
            })
            map.addLayer({
                id: 'outCircle',
                type: "fill", //通过此配置项为圆添加填充色
                source: 'outCircleSource',
                paint: {
                    'fill-color': [
                        "get", "color",
                    ],
                    "fill-opacity": 0.5
                },
            });
        } else {
            let features = source._data.features;//原有的绘制圆信息
            let feature = this.creatOuterCircleFeature(radians, centerCoordinate, color); //创建要绘制的圆

            feature.properties = {
                color
            }
            feature.id = id; //添加id
            features.push(feature);
            source.setData({
                'type': 'FeatureCollection',
                'features': features
            });
        }

    };
    //添加火力引导圆 id为fireCircle
    addFireCircle(info) {
        console.log(685);
        let color = 'red'
        var { centerCoordinate, radians, id } = info
        var map = this.map;

        let source = map.getSource('outCircleSource');

        if (!source) {
            let circlePoints = this.createCirclePoints(radians, centerCoordinate);
            id = id + ''
            map.addSource('outCircleSource', {
                type: 'geojson',
                data: {
                    type: 'FeatureCollection',
                    features: [
                        {
                            id,
                            "type": "feature",
                            properties: {
                                color,
                                radians
                            },
                            'geometry': {
                                'type': 'Polygon',
                                coordinates: circlePoints
                            }
                        }
                    ]
                }
            })
            map.addLayer({
                id: 'fire',
                type: "fill", //通过此配置项为圆添加填充色
                source: 'outCircleSource',
                paint: {
                    'fill-color': 'red',
                    "fill-opacity": 0.5
                },
            });
        } else {
         
            let features = source._data.features;//原有的绘制圆信息
            let feature = this.createGeoJSONCircleFeature(radians, centerCoordinate); //创建要绘制的圆
            feature.id = id; //添加id
            feature.properties = {
                color: 'red',
                radians,
            }

            features.push(feature);

            source.setData({
                type: 'FeatureCollection',
                features: features
            });

        }
        this.addMarker({
            meshId: id,
            coordinates: centerCoordinate,
            icon: "./js/images/my/40.png",
            iconSize: [25, 25]
        })
    };
    //删除火力引导圈
    removeFireCircle(id) {
        let source = this.map.getSource('outCircleSource'); //内圈source
        if (source) {
            let features = source._data.features; //内圈Features
            features = features.filter(feature => {
                return feature.id != id
            })
            source.setData({
                type: 'FeatureCollection',
                features: features
            });
        }
        let marker = this.overlays.markers.get(id)
        if (marker) {
            marker.remove()
        }
    };
    //更新火力引导的半径
    updateFireCircle(info) {
        let { taskId, safeRange, longitude, latitude } = info;
        let source = this.map.getSource('outCircleSource'); //内圈source
        let features = source._data.features; //内圈Features
        features.forEach(feature => {
            if (feature.id == taskId) {
                if (feature.properties.radians != safeRange) {
                    feature.properties.radians = safeRange;

                    let circlePoints = this.createCirclePoints(safeRange, [longitude, latitude]);
                    feature.geometry.coordinates = circlePoints;
                }
            }
        })
        source.setData({
            type: 'FeatureCollection',
            features: features
        });



    }
    //添加图片
    addImage(imgInfor) {
        let { url, coordinates } = imgInfor;
        let map = this.map;
        let source = map.getSource('flymap')
       
        if (source) {
          
            map.setLayoutProperty('radarLayer','visibility', 'visible')
            if (url) {
                url = 'file://' + url,
                source.updateImage({
                    url,
                    coordinates,
                });
            }else{
                map.setLayoutProperty('radarLayer','visibility', 'none')
            }
            
        }
    };
    //创建外圆
    creatOuterCircleFeature(radians, center, color) {
        let r = radians / 1000;
        let options = {
            steps: 32, //分割数量 数量越多圆越精细 默认值：64（如果圆比较大推荐类似 Math.floor(radius) * 10 这样根据半径可变的切割）
            units: "kilometers", //单位  可选值：degrees, radians, miles, kilometers 
            "properties": {
                'color': color
            }
        };
        let circle = turf.circle(center, r, options)

        circle = JSON.parse(JSON.stringify(circle))
        return circle
    };
    //创建内圆
    creatInnerCircleFeature(center) {
        let feature = {
            'type': 'Feature',
            'geometry': {
                'type': 'Point',
                coordinates: center
            }
        }
        return feature
    };
    //创建圆所需点的坐标
    createCirclePoints(radians, centerCoordinate) {
        let r = radians / 1000;
        let options = {
            steps: 32, //分割数量 数量越多圆越精细 默认值：64（如果圆比较大推荐类似 Math.floor(radius) * 10 这样根据半径可变的切割）
            units: "kilometers", //单位  可选值：degrees, radians, miles, kilometers
        };
        let circle = turf.circle(centerCoordinate, r, options)
        let points = circle.geometry.coordinates
        points = JSON.parse(JSON.stringify(points))
        return points
    };
    //
    getDistance(point1, point2) {
        var from = turf.point(point1);
        var to = turf.point(point2);
        var distance = turf.distance(from, to);
        distance = distance * 1000;
        return distance
    };
    createGeoJSONCircle(radius, center, points) {
        if (!points) points = 32;
        let radiusInKm = radius / 1000;
        var coords = {
            latitude: center[1],
            longitude: center[0]
        };
        var km = radiusInKm;
        var ret = [];
        var distanceX = km / (111.320 * Math.cos(coords.latitude * Math.PI / 180));
        var distanceY = km / 110.574;
        var theta, x, y;
        for (var i = 0; i < points; i++) {
            theta = (i / points) * (2 * Math.PI);
            x = distanceX * Math.cos(theta);
            y = distanceY * Math.sin(theta);

            ret.push([coords.longitude + x, coords.latitude + y]);
        }

        return [ret]

    };
    createGeoJSONCircleFeature(radius, center, points) {
        if (!points) points = 32;


        let radiusInKm = radius / 1000
        var coords = {
            latitude: center[1],
            longitude: center[0]
        };

        var km = radiusInKm;

        var ret = [];
        var distanceX = km / (111.320 * Math.cos(coords.latitude * Math.PI / 180));
        var distanceY = km / 110.574;

        var theta, x, y;
        for (var i = 0; i < points; i++) {
            theta = (i / points) * (2 * Math.PI);
            x = distanceX * Math.cos(theta);
            y = distanceY * Math.sin(theta);

            ret.push([coords.longitude + x, coords.latitude + y]);
        }


        return {
            "type": "Feature",
            "geometry": {
                "type": "Polygon",
                "coordinates": [ret]
            }

        }

    };
    //获取状态上报图片
    getReportImgByStatus(status, type) {
        let imgurl = '';
        let baseurl = './js/images/my/'
        if (status == 1) {
            switch (type) {
                case 1:
                    imgurl = baseurl + 'report3.png'
                    break;
                case 2:
                    imgurl = baseurl + 'report4.png'
                    break;
                case 3:
                    imgurl = baseurl + 'report5.png'
                    break;
                default:
                    break;
            }
        } else {

            switch (type) {
                case 1:
                    imgurl = baseurl + 'report6.png'
                    break;
                case 2:

                    imgurl = baseurl + 'report7.png'
                    break;
                case 3:

                    break;
                default:
                    break;
            }
        }

        return imgurl
    };
    //上报显示内容  type为2弹药详情 type为1 战斗力详情
    reportContent(type, list, meshName, meshId) {

        if (!list.length) {
            return {
                status: 0
            }
        } else {
            let temp = list.filter(it => {
                return it.type == type
            })

            if (!temp.length) {
                return {
                    status: 0
                }
            } else {
                temp[0].meshName = meshName;
                temp[0].meshId = meshId;
                return {
                    status: 1,
                    data: temp[0]
                }
            }
        }
    };
    getMemeberMarkerHTML(other, statusList) {
        let labelText = `<div class="member">`
        if (other.groupName) {
            labelText += `<div style='color:black;' class='text'>${other.groupName}</div>`
        }
        let details = {};
        labelText += `<div style='display:flex;'>`
        if (statusList) {
            let status2 = this.reportContent(2, statusList, other.name, other.id)

            if (status2.status > 0) {
                var ammoDetail = status2.data;
                ammoDetail.meshName = other.name;
                ammoDetail.meshId = other.id;
                details.ammoDetail = ammoDetail;
                let url = this.getReportImgByStatus(2, status2.data.status)
                labelText += `<img src=${url} class='report leftReport'>`
            }

        }

        labelText += `<div style='color:black' class='text'>${other.name}</div>`
        if (statusList) {
            var status1 = this.reportContent(1, statusList, other.name, other.id)

            if (status1.status > 0) {
                var battleDetail = status1.data;
                battleDetail.meshName = other.name;
                battleDetail.meshId = other.id;
                details.battleDetail = battleDetail;
                let url = this.getReportImgByStatus(1, status1.data.status)
                labelText += `<img src=${url} class='report rightReport'>`
            }
        }
        labelText += `</div></div>`

        return { labelText, details }
    }
}